.class public Lcom/nemustech/regina/widgets/tasks/TasksWidget;
.super Lcom/nemustech/regina/ElementReginaWidget;
.source "TasksWidget.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/nemustech/regina/widgets/tasks/TasksWidget$1;,
        Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskGadgetRunnable;,
        Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;
    }
.end annotation


# static fields
.field private static final COUNT_TASK_PROJECTION:[Ljava/lang/String; = null

.field private static final DEFAULT_DATE_FORMAT:Ljava/lang/String; = "yyyy/MM/dd"

.field private static final SETTINGS_DEFAULT_SORT_ORDER:Ljava/lang/String; = "_id ASC"

.field private static final SHORT_TASK_PROJECTION:[Ljava/lang/String; = null

.field private static final SORT_ORDER_ASC:Ljava/lang/String; = "ASC"

.field private static final STR_NO_DUE_DATE:Ljava/lang/String; = "No due date"

.field private static final STR_TASK_END:Ljava/lang/String; = "1"

.field private static final TAG:Ljava/lang/String; = "TasksWidget"

.field private static final TASKS_ORDER_COL_SIZE:I = 0x3

.field private static final TASK_APP_CLASS_NAME:Ljava/lang/String; = "com.nemustech.regina.apps.tasks"

.field private static final TASK_APP_PACKAGE_NAME:Ljava/lang/String; = "com.nemustech.regina.apps.tasks.TaskApp"

.field private static final TASK_CONTENT_URI:Landroid/net/Uri; = null

.field private static final TASK_DB_AUTHORITY:Ljava/lang/String; = "com.nemustech.regina.apps.tasks.Task"

.field private static final TASK_DB_COLUMN_END_DATE:Ljava/lang/String; = "end_date"

.field private static final TASK_DB_COLUMN_END_YN:Ljava/lang/String; = "end_yn"

.field private static final TASK_DB_COLUMN_ID:Ljava/lang/String; = "_id"

.field private static final TASK_DB_COLUMN_PRIORITY:Ljava/lang/String; = "priority"

.field private static final TASK_DB_COLUMN_START_DATE:Ljava/lang/String; = "start_date"

.field private static final TASK_DB_COLUMN_TITLE:Ljava/lang/String; = "title"

.field private static final TASK_DB_VALUE_INCOMPLETE:Ljava/lang/String; = "0"

.field private static final TASK_DEFAULT_SORT_ORDER:Ljava/lang/String; = "priority ASC"

.field private static final TASK_SETTINGS_DB_COLUMN_FILTER_COMPLETE:Ljava/lang/String; = "filter_complete"

.field private static final TASK_SETTINGS_DB_COLUMN_FILTER_INCOMPLETE:Ljava/lang/String; = "filter_incomplete"

.field private static final TASK_SETTINGS_DB_COLUMN_ID:Ljava/lang/String; = "_id"

.field private static final TASK_SETTINGS_DB_COLUMN_SORT_END_DATE:Ljava/lang/String; = "sort_end_date"

.field private static final TASK_SETTINGS_DB_COLUMN_SORT_PRIORITY:Ljava/lang/String; = "sort_priority"

.field private static final TASK_SETTINGS_DB_COLUMN_SORT_START_DATE:Ljava/lang/String; = "sort_start_date"

.field private static final TASK_SETTINGS_PROJECTION:[Ljava/lang/String; = null

.field private static final TASK_SETTINGS_UNSET_VALUE_SORT_ORDER:Ljava/lang/String; = null

.field private static final TASK_SETTINGS_URI:Landroid/net/Uri; = null

.field private static final TASK_WIDGET_TITLE:Ljava/lang/String; = "ToDo"


# instance fields
.field private mTaskList:Ljava/util/LinkedList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/LinkedList",
            "<",
            "Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;",
            ">;"
        }
    .end annotation
.end field

.field private mUID:I


# direct methods
.method static constructor <clinit>()V
    .locals 8

    .prologue
    const/4 v7, 0x4

    const/4 v6, 0x3

    const/4 v5, 0x2

    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 43
    const-string v0, "content://com.nemustech.regina.apps.tasks.Task/tasks"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    sput-object v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_CONTENT_URI:Landroid/net/Uri;

    .line 44
    const-string v0, "content://com.nemustech.regina.apps.tasks.Task/settings"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    sput-object v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_URI:Landroid/net/Uri;

    .line 66
    const v0, 0x7fffffff

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_UNSET_VALUE_SORT_ORDER:Ljava/lang/String;

    .line 72
    new-array v0, v4, [Ljava/lang/String;

    const-string v1, "_id"

    aput-object v1, v0, v3

    sput-object v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->COUNT_TASK_PROJECTION:[Ljava/lang/String;

    .line 76
    const/4 v0, 0x6

    new-array v0, v0, [Ljava/lang/String;

    const-string v1, "_id"

    aput-object v1, v0, v3

    const-string v1, "priority"

    aput-object v1, v0, v4

    const-string v1, "title"

    aput-object v1, v0, v5

    const-string v1, "start_date"

    aput-object v1, v0, v6

    const-string v1, "end_date"

    aput-object v1, v0, v7

    const/4 v1, 0x5

    const-string v2, "end_yn"

    aput-object v2, v0, v1

    sput-object v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->SHORT_TASK_PROJECTION:[Ljava/lang/String;

    .line 86
    const/4 v0, 0x6

    new-array v0, v0, [Ljava/lang/String;

    const-string v1, "_id"

    aput-object v1, v0, v3

    const-string v1, "filter_complete"

    aput-object v1, v0, v4

    const-string v1, "filter_incomplete"

    aput-object v1, v0, v5

    const-string v1, "sort_priority"

    aput-object v1, v0, v6

    const-string v1, "sort_start_date"

    aput-object v1, v0, v7

    const/4 v1, 0x5

    const-string v2, "sort_end_date"

    aput-object v2, v0, v1

    sput-object v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_PROJECTION:[Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 109
    const/4 v0, 0x1

    invoke-direct {p0, p1, v0}, Lcom/nemustech/regina/ElementReginaWidget;-><init>(Landroid/content/Context;Z)V

    .line 110
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mTaskList:Ljava/util/LinkedList;

    .line 112
    return-void
.end method

.method static synthetic access$100()Landroid/net/Uri;
    .locals 1

    .prologue
    .line 33
    sget-object v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_CONTENT_URI:Landroid/net/Uri;

    return-object v0
.end method

.method static synthetic access$200()[Ljava/lang/String;
    .locals 1

    .prologue
    .line 33
    sget-object v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->SHORT_TASK_PROJECTION:[Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$300(Lcom/nemustech/regina/widgets/tasks/TasksWidget;)Landroid/content/Context;
    .locals 1
    .parameter "x0"

    .prologue
    .line 33
    iget-object v0, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$400(Lcom/nemustech/regina/widgets/tasks/TasksWidget;)Landroid/content/Context;
    .locals 1
    .parameter "x0"

    .prologue
    .line 33
    iget-object v0, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method private displayToast(Landroid/content/Context;Ljava/lang/String;)V
    .locals 0
    .parameter "baseContext"
    .parameter "msg"

    .prologue
    .line 441
    invoke-static {p1, p2}, Lcom/nemustech/regina/RUtils;->showToast(Landroid/content/Context;Ljava/lang/String;)Landroid/widget/Toast;

    .line 442
    return-void
.end method

.method private getEllipsisString(Landroid/graphics/Paint;Ljava/lang/String;F)Ljava/lang/String;
    .locals 7
    .parameter "paint"
    .parameter "str"
    .parameter "maxWidth"

    .prologue
    const/4 v6, 0x0

    .line 375
    new-instance v1, Landroid/graphics/Rect;

    invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V

    .line 376
    .local v1, bound:Landroid/graphics/Rect;
    const-string v0, ".."

    .line 377
    .local v0, ELLIPSIS:Ljava/lang/String;
    const-string v3, ".."

    const/4 v4, 0x2

    invoke-virtual {p1, v3, v6, v4, v1}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V

    .line 379
    const/4 v3, 0x1

    invoke-virtual {v1}, Landroid/graphics/Rect;->width()I

    move-result v4

    int-to-float v4, v4

    sub-float v4, p3, v4

    const/4 v5, 0x0

    invoke-virtual {p1, p2, v3, v4, v5}, Landroid/graphics/Paint;->breakText(Ljava/lang/String;ZF[F)I

    move-result v2

    .line 381
    .local v2, filteredLen:I
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v3

    if-eq v2, v3, :cond_0

    .line 382
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p2, v6, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ".."

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 384
    :goto_0
    return-object v3

    :cond_0
    move-object v3, p2

    goto :goto_0
.end method

.method private getFormattedDateStr(JLjava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter "milliseconds"
    .parameter "format"

    .prologue
    .line 388
    new-instance v0, Ljava/text/SimpleDateFormat;

    invoke-direct {v0, p3}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 389
    .local v0, sdf:Ljava/text/SimpleDateFormat;
    new-instance v1, Ljava/util/Date;

    invoke-direct {v1, p1, p2}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method private getTaskCount(Z)I
    .locals 10
    .parameter "fromDB"

    .prologue
    .line 115
    const/4 v6, 0x0

    .line 116
    .local v6, contentProvider:Landroid/content/ContentProvider;
    if-eqz p1, :cond_3

    .line 117
    const/4 v9, 0x0

    .line 118
    .local v9, taskCursor:Landroid/database/Cursor;
    const/4 v7, 0x0

    .line 121
    .local v7, count:I
    :try_start_0
    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 122
    .local v0, cr:Landroid/content/ContentResolver;
    sget-object v1, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->COUNT_TASK_PROJECTION:[Ljava/lang/String;

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v9

    .line 124
    invoke-interface {v9}, Landroid/database/Cursor;->getCount()I

    move-result v7

    .line 125
    sget-object v1, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_CONTENT_URI:Landroid/net/Uri;

    invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->acquireContentProviderClient(Landroid/net/Uri;)Landroid/content/ContentProviderClient;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/ContentProviderClient;->release()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 126
    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mContext:Landroid/content/Context;

    const-string v2, "com.nemustech.regina.apps.tasks.TaskApp"

    invoke-static {v1, v2}, Lcom/nemustech/regina/RUtils;->forceStopPackage(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 132
    :cond_0
    if-eqz v9, :cond_1

    .line 133
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 134
    const/4 v9, 0x0

    .end local v0           #cr:Landroid/content/ContentResolver;
    :cond_1
    :goto_0
    move v1, v7

    .line 140
    .end local v7           #count:I
    .end local v9           #taskCursor:Landroid/database/Cursor;
    :goto_1
    return v1

    .line 129
    .restart local v7       #count:I
    .restart local v9       #taskCursor:Landroid/database/Cursor;
    :catch_0
    move-exception v1

    move-object v8, v1

    .line 130
    .local v8, e:Ljava/lang/Exception;
    :try_start_1
    invoke-virtual {v8}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 132
    if-eqz v9, :cond_1

    .line 133
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 134
    const/4 v9, 0x0

    goto :goto_0

    .line 132
    .end local v8           #e:Ljava/lang/Exception;
    :catchall_0
    move-exception v1

    if-eqz v9, :cond_2

    .line 133
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 134
    const/4 v9, 0x0

    :cond_2
    throw v1

    .line 140
    .end local v7           #count:I
    .end local v9           #taskCursor:Landroid/database/Cursor;
    :cond_3
    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mTaskList:Ljava/util/LinkedList;

    if-nez v1, :cond_4

    const/4 v1, 0x0

    goto :goto_1

    :cond_4
    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mTaskList:Ljava/util/LinkedList;

    invoke-virtual {v1}, Ljava/util/LinkedList;->size()I

    move-result v1

    goto :goto_1
.end method

.method private getTaskListFromDb()V
    .locals 11

    .prologue
    .line 303
    const/4 v9, 0x0

    .line 304
    .local v9, taskSettingsCursor:Landroid/database/Cursor;
    const/4 v7, 0x0

    .line 305
    .local v7, taskCursor:Landroid/database/Cursor;
    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mTaskList:Ljava/util/LinkedList;

    invoke-virtual {v1}, Ljava/util/LinkedList;->size()I

    move-result v1

    if-lez v1, :cond_0

    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mTaskList:Ljava/util/LinkedList;

    invoke-virtual {v1}, Ljava/util/LinkedList;->clear()V

    .line 308
    :cond_0
    :try_start_0
    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 309
    .local v0, cr:Landroid/content/ContentResolver;
    sget-object v1, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_URI:Landroid/net/Uri;

    sget-object v2, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_PROJECTION:[Ljava/lang/String;

    const/4 v3, 0x0

    const/4 v4, 0x0

    const-string v5, "_id ASC"

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v9

    .line 311
    invoke-direct {p0, v9}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->makeOrderBy(Landroid/database/Cursor;)Ljava/lang/String;

    move-result-object v5

    .line 312
    .local v5, orderBy:Ljava/lang/String;
    if-nez v5, :cond_1

    const-string v5, "priority ASC"

    .line 313
    :cond_1
    sget-object v1, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_URI:Landroid/net/Uri;

    invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->acquireContentProviderClient(Landroid/net/Uri;)Landroid/content/ContentProviderClient;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/ContentProviderClient;->release()Z

    .line 315
    sget-object v1, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_CONTENT_URI:Landroid/net/Uri;

    sget-object v2, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->SHORT_TASK_PROJECTION:[Ljava/lang/String;

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 318
    invoke-interface {v7}, Landroid/database/Cursor;->getCount()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v1

    if-gtz v1, :cond_4

    .line 339
    if-eqz v9, :cond_2

    .line 340
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 341
    const/4 v9, 0x0

    .line 343
    :cond_2
    if-eqz v7, :cond_3

    .line 344
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 345
    const/4 v7, 0x0

    .line 348
    .end local v0           #cr:Landroid/content/ContentResolver;
    .end local v5           #orderBy:Ljava/lang/String;
    :cond_3
    :goto_0
    return-void

    .line 319
    .restart local v0       #cr:Landroid/content/ContentResolver;
    .restart local v5       #orderBy:Ljava/lang/String;
    :cond_4
    :try_start_1
    invoke-interface {v7}, Landroid/database/Cursor;->moveToFirst()Z

    .line 321
    :cond_5
    new-instance v8, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;

    const/4 v1, 0x0

    invoke-direct {v8, p0, v1}, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;-><init>(Lcom/nemustech/regina/widgets/tasks/TasksWidget;Lcom/nemustech/regina/widgets/tasks/TasksWidget$1;)V

    .line 322
    .local v8, taskInfo:Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;
    const-string v1, "_id"

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v1

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    iput v1, v8, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mTaskId:I

    .line 323
    const-string v1, "priority"

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v1

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v10

    .line 324
    .local v10, temp:Ljava/lang/String;
    invoke-static {v10}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    add-int/lit8 v1, v1, 0x1

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v8, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mPriority:Ljava/lang/String;

    .line 325
    const-string v1, "title"

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v1

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v8, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mTitle:Ljava/lang/String;

    .line 326
    const-string v1, "end_yn"

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v1

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v8, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mEndYn:Ljava/lang/String;

    .line 327
    const-string v1, "start_date"

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v1

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v1

    iput-wide v1, v8, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mStartMillis:J

    .line 328
    const-string v1, "end_date"

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v1

    invoke-interface {v7, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v1

    iput-wide v1, v8, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mEndMillis:J

    .line 330
    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mTaskList:Ljava/util/LinkedList;

    invoke-virtual {v1, v8}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z

    .line 331
    invoke-interface {v7}, Landroid/database/Cursor;->moveToNext()Z

    move-result v1

    if-nez v1, :cond_5

    .line 333
    sget-object v1, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_CONTENT_URI:Landroid/net/Uri;

    invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->acquireContentProviderClient(Landroid/net/Uri;)Landroid/content/ContentProviderClient;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/ContentProviderClient;->release()Z

    move-result v1

    if-eqz v1, :cond_6

    .line 334
    iget-object v1, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mContext:Landroid/content/Context;

    const-string v2, "com.nemustech.regina.apps.tasks.TaskApp"

    invoke-static {v1, v2}, Lcom/nemustech/regina/RUtils;->forceStopPackage(Landroid/content/Context;Ljava/lang/String;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 339
    :cond_6
    if-eqz v9, :cond_7

    .line 340
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 341
    const/4 v9, 0x0

    .line 343
    :cond_7
    if-eqz v7, :cond_3

    .line 344
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 345
    const/4 v7, 0x0

    goto/16 :goto_0

    .line 336
    .end local v0           #cr:Landroid/content/ContentResolver;
    .end local v5           #orderBy:Ljava/lang/String;
    .end local v8           #taskInfo:Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;
    .end local v10           #temp:Ljava/lang/String;
    :catch_0
    move-exception v1

    move-object v6, v1

    .line 337
    .local v6, e:Ljava/lang/Exception;
    :try_start_2
    invoke-virtual {v6}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 339
    if-eqz v9, :cond_8

    .line 340
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 341
    const/4 v9, 0x0

    .line 343
    :cond_8
    if-eqz v7, :cond_3

    .line 344
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 345
    const/4 v7, 0x0

    goto/16 :goto_0

    .line 339
    .end local v6           #e:Ljava/lang/Exception;
    :catchall_0
    move-exception v1

    if-eqz v9, :cond_9

    .line 340
    invoke-interface {v9}, Landroid/database/Cursor;->close()V

    .line 341
    const/4 v9, 0x0

    .line 343
    :cond_9
    if-eqz v7, :cond_a

    .line 344
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    .line 345
    const/4 v7, 0x0

    :cond_a
    throw v1
.end method

.method private makeDateText(JJ)Ljava/lang/String;
    .locals 5
    .parameter "startMillis"
    .parameter "endMillis"

    .prologue
    const-wide v3, 0x7fffffffffffffffL

    .line 351
    new-instance v1, Ljava/lang/StringBuffer;

    invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V

    .line 353
    .local v1, startDateSb:Ljava/lang/StringBuffer;
    cmp-long v2, p1, v3

    if-eqz v2, :cond_0

    .line 354
    const-string v2, "yyyy/MM/dd"

    invoke-direct {p0, p1, p2, v2}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->getFormattedDateStr(JLjava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 357
    :cond_0
    new-instance v0, Ljava/lang/StringBuffer;

    invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V

    .line 358
    .local v0, endDateSb:Ljava/lang/StringBuffer;
    cmp-long v2, p3, v3

    if-eqz v2, :cond_2

    .line 359
    const-string v2, "yyyy/MM/dd"

    invoke-direct {p0, p3, p4, v2}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->getFormattedDateStr(JLjava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 364
    :cond_1
    :goto_0
    invoke-virtual {v0}, Ljava/lang/StringBuffer;->length()I

    move-result v2

    if-lez v2, :cond_3

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "~"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    :goto_1
    return-object v2

    .line 361
    :cond_2
    invoke-virtual {v1}, Ljava/lang/StringBuffer;->length()I

    move-result v2

    if-lez v2, :cond_1

    const-string v2, "No due date"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto :goto_0

    .line 364
    :cond_3
    const-string v2, ""

    goto :goto_1
.end method

.method private makeEndTitle(Ljava/lang/CharSequence;)Landroid/text/SpannableString;
    .locals 4
    .parameter "title"

    .prologue
    const/4 v3, 0x0

    .line 368
    new-instance v0, Landroid/text/SpannableString;

    invoke-direct {v0, p1}, Landroid/text/SpannableString;-><init>(Ljava/lang/CharSequence;)V

    .line 369
    .local v0, spTitle:Landroid/text/SpannableString;
    new-instance v1, Landroid/text/style/StrikethroughSpan;

    invoke-direct {v1}, Landroid/text/style/StrikethroughSpan;-><init>()V

    invoke-virtual {v0}, Landroid/text/SpannableString;->length()I

    move-result v2

    invoke-virtual {v0, v1, v3, v2, v3}, Landroid/text/SpannableString;->setSpan(Ljava/lang/Object;III)V

    .line 370
    return-object v0
.end method

.method private makeOrderBy(Landroid/database/Cursor;)Ljava/lang/String;
    .locals 7
    .parameter "c"

    .prologue
    .line 393
    if-eqz p1, :cond_0

    invoke-interface {p1}, Landroid/database/Cursor;->getCount()I

    move-result v6

    if-gtz v6, :cond_1

    :cond_0
    const/4 v6, 0x0

    .line 430
    :goto_0
    return-object v6

    .line 395
    :cond_1
    invoke-interface {p1}, Landroid/database/Cursor;->moveToFirst()Z

    .line 397
    new-instance v5, Ljava/lang/StringBuffer;

    invoke-direct {v5}, Ljava/lang/StringBuffer;-><init>()V

    .line 398
    .local v5, orderBy:Ljava/lang/StringBuffer;
    const/4 v6, 0x3

    new-array v1, v6, [Ljava/lang/String;

    .line 400
    .local v1, colArr:[Ljava/lang/String;
    const-string v6, "sort_priority"

    invoke-interface {p1, v6}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v0

    .line 401
    .local v0, col:I
    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    .line 402
    .local v4, order:Ljava/lang/String;
    const/4 v3, -0x1

    .line 403
    .local v3, idx:I
    sget-object v6, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_UNSET_VALUE_SORT_ORDER:Ljava/lang/String;

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_2

    .line 404
    invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    .line 405
    const-string v6, "priority"

    aput-object v6, v1, v3

    .line 408
    :cond_2
    const-string v6, "sort_start_date"

    invoke-interface {p1, v6}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v0

    .line 409
    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    .line 410
    sget-object v6, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_UNSET_VALUE_SORT_ORDER:Ljava/lang/String;

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_3

    .line 411
    invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    .line 412
    const-string v6, "start_date"

    aput-object v6, v1, v3

    .line 415
    :cond_3
    const-string v6, "sort_end_date"

    invoke-interface {p1, v6}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v0

    .line 416
    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    .line 417
    sget-object v6, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->TASK_SETTINGS_UNSET_VALUE_SORT_ORDER:Ljava/lang/String;

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_4

    .line 418
    invoke-static {v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    .line 419
    const-string v6, "end_date"

    aput-object v6, v1, v3

    .line 421
    :cond_4
    const/4 v2, 0x0

    .local v2, i:I
    :goto_1
    array-length v6, v1

    if-ge v2, v6, :cond_5

    .line 422
    aget-object v6, v1, v2

    if-nez v6, :cond_7

    .line 429
    :cond_5
    invoke-virtual {v5}, Ljava/lang/StringBuffer;->length()I

    move-result v6

    if-lez v6, :cond_6

    const-string v6, " ASC"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 430
    :cond_6
    invoke-virtual {v5}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v6

    goto :goto_0

    .line 423
    :cond_7
    invoke-virtual {v5}, Ljava/lang/StringBuffer;->length()I

    move-result v6

    if-lez v6, :cond_8

    .line 424
    const-string v6, ","

    invoke-virtual {v5, v6}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 426
    :cond_8
    aget-object v6, v1, v2

    invoke-virtual {v5, v6}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 421
    add-int/lit8 v2, v2, 0x1

    goto :goto_1
.end method


# virtual methods
.method protected hasTitle()Z
    .locals 1

    .prologue
    .line 188
    const/4 v0, 0x1

    return v0
.end method

.method protected onCreate()V
    .locals 2

    .prologue
    .line 146
    const/4 v0, 0x1

    invoke-direct {p0, v0}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->getTaskCount(Z)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->createWidget(I)V

    .line 147
    invoke-super {p0}, Lcom/nemustech/regina/ElementReginaWidget;->getTitlePanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v0

    const-string v1, "Task Widget Title Panel"

    iput-object v1, v0, Lcom/nemustech/tiffany/world/TFPanel;->mDescription:Ljava/lang/String;

    .line 148
    invoke-super {p0}, Lcom/nemustech/regina/ElementReginaWidget;->getCenterPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v0

    const-string v1, "Task Widget Center Panel"

    iput-object v1, v0, Lcom/nemustech/tiffany/world/TFPanel;->mDescription:Ljava/lang/String;

    .line 149
    invoke-super {p0}, Lcom/nemustech/regina/ElementReginaWidget;->getBottomPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v0

    const-string v1, "Task Widget Bottom Panel"

    iput-object v1, v0, Lcom/nemustech/tiffany/world/TFPanel;->mDescription:Ljava/lang/String;

    .line 150
    invoke-super {p0}, Lcom/nemustech/regina/ElementReginaWidget;->getFrontCenterItemPanel()Lcom/nemustech/tiffany/world/TFPanel;

    move-result-object v0

    const-string v1, "Task Widget Center Item Panel"

    iput-object v1, v0, Lcom/nemustech/tiffany/world/TFPanel;->mDescription:Ljava/lang/String;

    .line 151
    return-void
.end method

.method protected onDrawBackItem(Landroid/graphics/Bitmap;Landroid/graphics/Rect;I)V
    .locals 0
    .parameter "bitmap"
    .parameter "area"
    .parameter "index"

    .prologue
    .line 485
    return-void
.end method

.method protected onDrawBackTitle(Landroid/graphics/Bitmap;Landroid/graphics/Rect;)V
    .locals 1
    .parameter "bitmap"
    .parameter "area"

    .prologue
    .line 480
    const-string v0, "Ajustes ToDo"

    invoke-super {p0, p1, p2, v0}, Lcom/nemustech/regina/ElementReginaWidget;->drawTitle(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Ljava/lang/String;)V

    .line 481
    return-void
.end method

.method protected onDrawFrontItem(Landroid/graphics/Bitmap;Landroid/graphics/Rect;I)V
    .locals 38
    .parameter "bitmap"
    .parameter "area"
    .parameter "index"

    .prologue
    .line 193
    const/16 v27, 0x8

    .line 194
    .local v27, rectWidthOffset:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mTaskList:Ljava/util/LinkedList;

    move-object v7, v0

    invoke-virtual {v7}, Ljava/util/LinkedList;->size()I

    move-result v7

    move/from16 v0, p3

    move v1, v7

    if-lt v0, v1, :cond_0

    .line 196
    new-instance v25, Landroid/content/Intent;

    const-string v7, "android.intent.action.MAIN"

    move-object/from16 v0, v25

    move-object v1, v7

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 197
    .local v25, intent:Landroid/content/Intent;
    const-string v7, "com.nemustech.regina.apps.tasks"

    const-string v8, "com.nemustech.regina.apps.tasks.TaskApp"

    move-object/from16 v0, v25

    move-object v1, v7

    move-object v2, v8

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 199
    new-instance v33, Landroid/graphics/Rect;

    add-int/lit8 v7, v27, 0x0

    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move v8, v0

    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->right:I

    move v9, v0

    sub-int v9, v9, v27

    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move v10, v0

    move-object/from16 v0, v33

    move v1, v7

    move v2, v8

    move v3, v9

    move v4, v10

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 200
    .local v33, taskIntentRect:Landroid/graphics/Rect;
    new-instance v32, Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    new-instance v7, Landroid/graphics/Rect;

    move-object v0, v7

    move-object/from16 v1, v33

    invoke-direct {v0, v1}, Landroid/graphics/Rect;-><init>(Landroid/graphics/Rect;)V

    const/4 v8, 0x0

    move-object/from16 v0, v32

    move-object/from16 v1, p0

    move-object v2, v7

    move-object v3, v8

    invoke-direct {v0, v1, v2, v3}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;-><init>(Lcom/nemustech/regina/ElementReginaWidget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V

    .line 201
    .local v32, taskIntentGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    move-object/from16 v0, v32

    move-object/from16 v1, v25

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setIntent(Landroid/content/Intent;)V

    .line 202
    const/4 v7, 0x2

    move-object/from16 v0, v32

    move v1, v7

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setGadgetType(I)V

    .line 203
    const/4 v7, 0x0

    move-object/from16 v0, p0

    move v1, v7

    move-object/from16 v2, v32

    invoke-virtual {v0, v1, v2}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->addGadget(ILcom/nemustech/regina/ElementReginaWidget$Gadget;)V

    .line 300
    .end local v33           #taskIntentRect:Landroid/graphics/Rect;
    :goto_0
    return-void

    .line 208
    .end local v25           #intent:Landroid/content/Intent;
    .end local v32           #taskIntentGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    :cond_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mTaskList:Ljava/util/LinkedList;

    move-object v7, v0

    move-object v0, v7

    move/from16 v1, p3

    invoke-virtual {v0, v1}, Ljava/util/LinkedList;->get(I)Ljava/lang/Object;

    move-result-object v31

    check-cast v31, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;

    .line 210
    .local v31, taskInfo:Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;
    new-instance v5, Landroid/graphics/Canvas;

    move-object v0, v5

    move-object/from16 v1, p1

    invoke-direct {v0, v1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 211
    .local v5, canvas:Landroid/graphics/Canvas;
    new-instance v11, Landroid/graphics/Paint;

    invoke-direct {v11}, Landroid/graphics/Paint;-><init>()V

    .line 212
    .local v11, paint:Landroid/graphics/Paint;
    new-instance v35, Landroid/graphics/Rect;

    invoke-direct/range {v35 .. v35}, Landroid/graphics/Rect;-><init>()V

    .line 213
    .local v35, titleBounds:Landroid/graphics/Rect;
    new-instance v22, Landroid/graphics/Rect;

    invoke-direct/range {v22 .. v22}, Landroid/graphics/Rect;-><init>()V

    .line 215
    .local v22, dateBounds:Landroid/graphics/Rect;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f060048

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v37

    .line 216
    .local v37, vMargin:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f060049

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v24

    .line 217
    .local v24, hMargin:I
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f060054

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v19

    .line 218
    .local v19, cbSize:I
    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Rect;->height()I

    move-result v28

    .line 219
    .local v28, rowHeight:I
    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Rect;->width()I

    move-result v29

    .line 221
    .local v29, rowWidth:I
    const/16 v18, 0x0

    .line 223
    .local v18, ascent:I
    const/4 v7, 0x1

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 224
    sget-object v7, Landroid/graphics/Paint$Align;->LEFT:Landroid/graphics/Paint$Align;

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 225
    const/high16 v7, 0x3f00

    const/high16 v8, 0x3f80

    const/high16 v9, 0x3f80

    const/high16 v10, -0x100

    invoke-virtual {v11, v7, v8, v9, v10}, Landroid/graphics/Paint;->setShadowLayer(FFFI)V

    .line 227
    move-object/from16 v0, v31

    iget-wide v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mStartMillis:J

    move-wide v7, v0

    move-object/from16 v0, v31

    iget-wide v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mEndMillis:J

    move-wide v9, v0

    move-object/from16 v0, p0

    move-wide v1, v7

    move-wide v3, v9

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->makeDateText(JJ)Ljava/lang/String;

    move-result-object v23

    .line 228
    .local v23, dateRow:Ljava/lang/String;
    invoke-virtual/range {v23 .. v23}, Ljava/lang/String;->length()I

    move-result v7

    if-lez v7, :cond_1

    .line 229
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f060052

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v7

    int-to-float v7, v7

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 230
    const/4 v7, 0x0

    invoke-virtual/range {v23 .. v23}, Ljava/lang/String;->length()I

    move-result v8

    move-object v0, v11

    move-object/from16 v1, v23

    move v2, v7

    move v3, v8

    move-object/from16 v4, v22

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V

    .line 233
    :cond_1
    move/from16 v0, v24

    int-to-float v0, v0

    move v9, v0

    .line 234
    .local v9, x:F
    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move v7, v0

    invoke-virtual/range {v35 .. v35}, Landroid/graphics/Rect;->height()I

    move-result v8

    sub-int v8, v28, v8

    invoke-virtual/range {v22 .. v22}, Landroid/graphics/Rect;->height()I

    move-result v10

    sub-int/2addr v8, v10

    sub-int v8, v8, v37

    div-int/lit8 v8, v8, 0x2

    add-int/2addr v7, v8

    int-to-float v10, v7

    .line 238
    .local v10, y:F
    const/4 v7, -0x1

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setColor(I)V

    .line 239
    sget-object v7, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 240
    const/high16 v7, 0x3f80

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 241
    new-instance v21, Landroid/graphics/RectF;

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Rect;->centerY()I

    move-result v7

    div-int/lit8 v8, v19, 0x2

    sub-int/2addr v7, v8

    int-to-float v7, v7

    move/from16 v0, v19

    int-to-float v0, v0

    move v8, v0

    add-float/2addr v8, v9

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Rect;->centerY()I

    move-result v12

    div-int/lit8 v13, v19, 0x2

    sub-int/2addr v12, v13

    add-int v12, v12, v19

    int-to-float v12, v12

    move-object/from16 v0, v21

    move v1, v9

    move v2, v7

    move v3, v8

    move v4, v12

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/RectF;-><init>(FFFF)V

    .line 242
    .local v21, chkRect:Landroid/graphics/RectF;
    move-object v0, v5

    move-object/from16 v1, v21

    move-object v2, v11

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/RectF;Landroid/graphics/Paint;)V

    .line 243
    move-object/from16 v0, v31

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mEndYn:Ljava/lang/String;

    move-object v7, v0

    const-string v8, "1"

    invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_2

    .line 244
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mResources:Landroid/content/res/Resources;

    move-object v7, v0

    const v8, 0x7f020025

    invoke-static {v7, v8}, Lcom/nemustech/regina/RUtils;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v20

    .line 245
    .local v20, chkBitmap:Landroid/graphics/Bitmap;
    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Rect;->centerY()I

    move-result v7

    div-int/lit8 v8, v19, 0x2

    sub-int/2addr v7, v8

    int-to-float v7, v7

    const/4 v8, 0x0

    move-object v0, v5

    move-object/from16 v1, v20

    move v2, v9

    move v3, v7

    move-object v4, v8

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V

    .line 249
    .end local v20           #chkBitmap:Landroid/graphics/Bitmap;
    :cond_2
    add-int v7, v24, v19

    int-to-float v7, v7

    add-float/2addr v9, v7

    .line 250
    div-int/lit8 v7, v19, 0x2

    int-to-float v7, v7

    add-float/2addr v10, v7

    .line 251
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f060053

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v7

    int-to-float v7, v7

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 252
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f050013

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getColor(I)I

    move-result v7

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setColor(I)V

    .line 253
    sget-object v7, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 254
    sget-object v7, Landroid/graphics/Typeface;->DEFAULT_BOLD:Landroid/graphics/Typeface;

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    .line 255
    new-instance v26, Landroid/graphics/Rect;

    invoke-direct/range {v26 .. v26}, Landroid/graphics/Rect;-><init>()V

    .line 256
    .local v26, priorityBounds:Landroid/graphics/Rect;
    move-object/from16 v0, v31

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mPriority:Ljava/lang/String;

    move-object v7, v0

    const/4 v8, 0x0

    move-object/from16 v0, v31

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mPriority:Ljava/lang/String;

    move-object v12, v0

    invoke-virtual {v12}, Ljava/lang/String;->length()I

    move-result v12

    move-object v0, v11

    move-object v1, v7

    move v2, v8

    move v3, v12

    move-object/from16 v4, v26

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V

    .line 257
    move-object/from16 v0, v31

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mPriority:Ljava/lang/String;

    move-object v7, v0

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Rect;->centerY()I

    move-result v8

    int-to-float v8, v8

    invoke-virtual {v11}, Landroid/graphics/Paint;->getTextSize()F

    move-result v12

    const/high16 v13, 0x4040

    div-float/2addr v12, v13

    add-float/2addr v8, v12

    invoke-virtual {v5, v7, v9, v8, v11}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 260
    new-instance v36, Landroid/graphics/Rect;

    add-int/lit8 v7, v27, 0x0

    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move v8, v0

    float-to-int v12, v9

    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move v13, v0

    move-object/from16 v0, v36

    move v1, v7

    move v2, v8

    move v3, v12

    move v4, v13

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 261
    .local v36, toggleGadgetRect:Landroid/graphics/Rect;
    new-instance v34, Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    new-instance v7, Landroid/graphics/Rect;

    move-object v0, v7

    move-object/from16 v1, v36

    invoke-direct {v0, v1}, Landroid/graphics/Rect;-><init>(Landroid/graphics/Rect;)V

    const/4 v8, 0x0

    move-object/from16 v0, v34

    move-object/from16 v1, p0

    move-object v2, v7

    move-object v3, v8

    invoke-direct {v0, v1, v2, v3}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;-><init>(Lcom/nemustech/regina/ElementReginaWidget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V

    .line 262
    .local v34, taskToggleGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    new-instance v7, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskGadgetRunnable;

    move-object/from16 v0, v31

    iget v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mTaskId:I

    move v8, v0

    move-object v0, v7

    move-object/from16 v1, p0

    move v2, v8

    invoke-direct {v0, v1, v2}, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskGadgetRunnable;-><init>(Lcom/nemustech/regina/widgets/tasks/TasksWidget;I)V

    move-object/from16 v0, v34

    move-object v1, v7

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setActor(Ljava/lang/Runnable;)V

    .line 263
    const/4 v7, 0x1

    move-object/from16 v0, v34

    move v1, v7

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setGadgetType(I)V

    .line 264
    const/4 v7, 0x0

    move-object/from16 v0, p0

    move v1, v7

    move-object/from16 v2, v34

    invoke-virtual {v0, v1, v2}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->addGadget(ILcom/nemustech/regina/ElementReginaWidget$Gadget;)V

    .line 267
    move-object/from16 v0, v31

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mTitle:Ljava/lang/String;

    move-object v7, v0

    float-to-int v8, v9

    sub-int v8, v29, v8

    invoke-static {v7, v11, v8}, Lcom/nemustech/regina/RUtils;->getEllipsisString(Ljava/lang/String;Landroid/graphics/Paint;I)Ljava/lang/String;

    move-result-object v6

    .line 268
    .local v6, titleRow:Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f060051

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v7

    int-to-float v7, v7

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 269
    const/4 v7, 0x0

    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v8

    move-object v0, v11

    move-object v1, v6

    move v2, v7

    move v3, v8

    move-object/from16 v4, v35

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V

    .line 271
    div-int/lit8 v7, v24, 0x2

    add-int v7, v7, v24

    int-to-float v7, v7

    add-float/2addr v9, v7

    .line 272
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f060051

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v7

    int-to-float v7, v7

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 273
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f050010

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getColor(I)I

    move-result v7

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setColor(I)V

    .line 274
    sget-object v7, Landroid/graphics/Typeface;->DEFAULT:Landroid/graphics/Typeface;

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;

    .line 275
    const/4 v7, 0x0

    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v8

    invoke-virtual/range {v5 .. v11}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;IIFFLandroid/graphics/Paint;)V

    .line 276
    move-object/from16 v0, v31

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mEndYn:Ljava/lang/String;

    move-object v7, v0

    const-string v8, "1"

    invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_3

    .line 277
    const/high16 v7, -0x1

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setColor(I)V

    .line 278
    invoke-virtual/range {v35 .. v35}, Landroid/graphics/Rect;->centerY()I

    move-result v7

    int-to-float v7, v7

    add-float v14, v10, v7

    move-object/from16 v0, v35

    iget v0, v0, Landroid/graphics/Rect;->right:I

    move v7, v0

    int-to-float v7, v7

    add-float v15, v9, v7

    invoke-virtual/range {v35 .. v35}, Landroid/graphics/Rect;->centerY()I

    move-result v7

    int-to-float v7, v7

    add-float/2addr v7, v10

    const/high16 v8, 0x4000

    add-float v16, v7, v8

    move-object v12, v5

    move v13, v9

    move-object/from16 v17, v11

    invoke-virtual/range {v12 .. v17}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    .line 282
    :cond_3
    invoke-virtual/range {v23 .. v23}, Ljava/lang/String;->length()I

    move-result v7

    if-lez v7, :cond_4

    .line 283
    move/from16 v0, v18

    int-to-float v0, v0

    move v7, v0

    add-float/2addr v10, v7

    .line 284
    invoke-virtual {v11}, Landroid/graphics/Paint;->ascent()F

    move-result v7

    neg-float v7, v7

    float-to-double v7, v7

    invoke-static {v7, v8}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v7

    move-wide v0, v7

    double-to-int v0, v0

    move/from16 v18, v0

    .line 285
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f050012

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getColor(I)I

    move-result v7

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setColor(I)V

    .line 286
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    move-object v7, v0

    const v8, 0x7f060052

    invoke-virtual {v7, v8}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v7

    int-to-float v7, v7

    invoke-virtual {v11, v7}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 287
    move/from16 v0, v18

    int-to-float v0, v0

    move v7, v0

    add-float/2addr v7, v10

    move-object v0, v5

    move-object/from16 v1, v23

    move v2, v9

    move v3, v7

    move-object v4, v11

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 291
    :cond_4
    new-instance v25, Landroid/content/Intent;

    const-string v7, "android.intent.action.MAIN"

    move-object/from16 v0, v25

    move-object v1, v7

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 292
    .restart local v25       #intent:Landroid/content/Intent;
    const-string v7, "com.nemustech.regina.apps.tasks"

    const-string v8, "com.nemustech.regina.apps.tasks.TaskApp"

    move-object/from16 v0, v25

    move-object v1, v7

    move-object v2, v8

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 293
    const-string v7, "ID"

    move-object/from16 v0, v31

    iget v0, v0, Lcom/nemustech/regina/widgets/tasks/TasksWidget$TaskInfo;->mTaskId:I

    move v8, v0

    invoke-static {v8}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v8

    move-object/from16 v0, v25

    move-object v1, v7

    move-object v2, v8

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 295
    new-instance v30, Landroid/graphics/Rect;

    float-to-int v7, v9

    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move v8, v0

    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->right:I

    move v9, v0

    .end local v9           #x:F
    sub-int v9, v9, v27

    move-object/from16 v0, p2

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move v10, v0

    .end local v10           #y:F
    move-object/from16 v0, v30

    move v1, v7

    move v2, v8

    move v3, v9

    move v4, v10

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 296
    .local v30, taskGadgetRect:Landroid/graphics/Rect;
    new-instance v32, Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    new-instance v7, Landroid/graphics/Rect;

    move-object v0, v7

    move-object/from16 v1, v30

    invoke-direct {v0, v1}, Landroid/graphics/Rect;-><init>(Landroid/graphics/Rect;)V

    const/4 v8, 0x0

    move-object/from16 v0, v32

    move-object/from16 v1, p0

    move-object v2, v7

    move-object v3, v8

    invoke-direct {v0, v1, v2, v3}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;-><init>(Lcom/nemustech/regina/ElementReginaWidget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V

    .line 297
    .restart local v32       #taskIntentGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    move-object/from16 v0, v32

    move-object/from16 v1, v25

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setIntent(Landroid/content/Intent;)V

    .line 298
    const/4 v7, 0x2

    move-object/from16 v0, v32

    move v1, v7

    invoke-virtual {v0, v1}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setGadgetType(I)V

    .line 299
    const/4 v7, 0x0

    move-object/from16 v0, p0

    move v1, v7

    move-object/from16 v2, v32

    invoke-virtual {v0, v1, v2}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->addGadget(ILcom/nemustech/regina/ElementReginaWidget$Gadget;)V

    goto/16 :goto_0
.end method

.method protected onDrawFrontTitle(Landroid/graphics/Bitmap;Landroid/graphics/Rect;)V
    .locals 12
    .parameter "bitmap"
    .parameter "area"

    .prologue
    const/4 v11, 0x2

    const/high16 v10, 0x3f80

    .line 156
    new-instance v2, Landroid/graphics/Canvas;

    invoke-direct {v2, p1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 157
    .local v2, canvas:Landroid/graphics/Canvas;
    new-instance v6, Landroid/graphics/Paint;

    invoke-direct {v6}, Landroid/graphics/Paint;-><init>()V

    .line 158
    .local v6, paint:Landroid/graphics/Paint;
    new-instance v1, Landroid/graphics/Rect;

    invoke-direct {v1}, Landroid/graphics/Rect;-><init>()V

    .line 159
    .local v1, bounds:Landroid/graphics/Rect;
    const/4 v8, 0x1

    invoke-virtual {v6, v8}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    .line 160
    sget-object v8, Landroid/graphics/Paint$Align;->LEFT:Landroid/graphics/Paint$Align;

    invoke-virtual {v6, v8}, Landroid/graphics/Paint;->setTextAlign(Landroid/graphics/Paint$Align;)V

    .line 161
    iget-object v8, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v9, 0x7f060042

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/ResourceCare;->getDimensionI(I)I

    move-result v8

    int-to-float v8, v8

    invoke-virtual {v6, v8}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 162
    iget-object v8, p0, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->mRC:Lcom/nemustech/regina/ResourceCare;

    const v9, 0x7f050006

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/ResourceCare;->getColor(I)I

    move-result v8

    invoke-virtual {v6, v8}, Landroid/graphics/Paint;->setColor(I)V

    .line 163
    const/high16 v8, 0x3f00

    const/high16 v9, -0x100

    invoke-virtual {v6, v8, v10, v10, v9}, Landroid/graphics/Paint;->setShadowLayer(FFFI)V

    .line 164
    const-string v8, "ToDo"

    invoke-virtual {p2}, Landroid/graphics/Rect;->width()I

    move-result v9

    invoke-static {v8, v6, v9}, Lcom/nemustech/regina/RUtils;->getEllipsisString(Ljava/lang/String;Landroid/graphics/Paint;I)Ljava/lang/String;

    move-result-object v3

    .line 165
    .local v3, ellipsisString:Ljava/lang/String;
    const/4 v8, 0x0

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v9

    invoke-virtual {v6, v3, v8, v9, v1}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V

    .line 166
    invoke-virtual {p2}, Landroid/graphics/Rect;->height()I

    move-result v8

    invoke-virtual {v1}, Landroid/graphics/Rect;->height()I

    move-result v9

    sub-int/2addr v8, v9

    div-int/lit8 v8, v8, 0x2

    int-to-float v5, v8

    .line 167
    .local v5, offset:F
    invoke-virtual {v6}, Landroid/graphics/Paint;->ascent()F

    move-result v8

    neg-float v8, v8

    float-to-double v8, v8

    invoke-static {v8, v9}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v8

    double-to-int v0, v8

    .line 168
    .local v0, ascent:I
    iget v8, p2, Landroid/graphics/Rect;->left:I

    int-to-float v8, v8

    iget v9, p2, Landroid/graphics/Rect;->top:I

    int-to-float v9, v9

    add-float/2addr v9, v5

    int-to-float v10, v0

    add-float/2addr v9, v10

    invoke-virtual {v2, v3, v8, v9, v6}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 171
    new-instance v4, Landroid/content/Intent;

    const-string v8, "android.intent.action.MAIN"

    invoke-direct {v4, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 172
    .local v4, intent:Landroid/content/Intent;
    const-string v8, "com.nemustech.regina.apps.tasks"

    const-string v9, "com.nemustech.regina.apps.tasks.TaskApp"

    invoke-virtual {v4, v8, v9}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 174
    new-instance v7, Lcom/nemustech/regina/ElementReginaWidget$Gadget;

    new-instance v8, Landroid/graphics/Rect;

    invoke-direct {v8, p2}, Landroid/graphics/Rect;-><init>(Landroid/graphics/Rect;)V

    const/4 v9, 0x0

    invoke-direct {v7, p0, v8, v9}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;-><init>(Lcom/nemustech/regina/ElementReginaWidget;Landroid/graphics/Rect;Landroid/graphics/Rect;)V

    .line 175
    .local v7, taskIntentGadget:Lcom/nemustech/regina/ElementReginaWidget$Gadget;
    invoke-virtual {v7, v4}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setIntent(Landroid/content/Intent;)V

    .line 176
    invoke-virtual {v7, v11}, Lcom/nemustech/regina/ElementReginaWidget$Gadget;->setGadgetType(I)V

    .line 177
    invoke-virtual {p0, v11, v7}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->addGadget(ILcom/nemustech/regina/ElementReginaWidget$Gadget;)V

    .line 178
    return-void
.end method

.method protected onResume()V
    .locals 1

    .prologue
    .line 434
    invoke-direct {p0}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->getTaskListFromDb()V

    .line 435
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->getTaskCount(Z)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->resetPages(I)V

    .line 436
    invoke-virtual {p0}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->update()V

    .line 437
    return-void
.end method

.method protected onUpdate()Z
    .locals 1

    .prologue
    .line 182
    invoke-direct {p0}, Lcom/nemustech/regina/widgets/tasks/TasksWidget;->getTaskListFromDb()V

    .line 183
    const/4 v0, 0x1

    return v0
.end method

.method protected onUpdateTitle()Z
    .locals 1

    .prologue
    .line 489
    const/4 v0, 0x0

    return v0
.end method
